package org.example.myl.service.impl;

import org.example.myl.common.Response;
import org.example.myl.entity.Student;
import org.example.myl.entity.aggregation.StudentAggregation;
import org.example.myl.entity.vo.VoStudent;
import org.example.myl.mapper.StudentMapper;
import org.example.myl.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentMapper studentMapper;
    @Override
    public void insertstudent(VoStudent student) {
        studentMapper.insertstudent(student);
    }

    @Override
    public void deletestudent(Long id) {
        studentMapper.deletestudent(id);
    }

    @Override
    public Student findStudentById(Long id) {
        return studentMapper.findStudentById(id);
    }

    @Override
    public void updateStudent(Student student) {
        studentMapper.updateStudent(student);
    }

    @Override
    public List<Student> page_student() {
        return studentMapper.page_student();
    }

    @Override
    public  List<StudentAggregation> findStudentCourseAndSourse(Long id) {
        return studentMapper.findStudentCourseAndSourse(id);
    }

    @Override
    public List<Student> findAll() {
        return studentMapper.findAll();
    }

    @Override
    public List<Student> findStudentAll() {
        return studentMapper.findStudentAll();
    }

    @Override
    public void insertstudentandimages(VoStudent student) {
        studentMapper.insertstudentandimages(student);
    }


}
